package com.tsing.mapper.impl;

import com.tsing.common.framwork.mapper.CommonDao;
import com.tsing.mapper.CommentsMapper;

import java.sql.SQLException;

/**
 * @auth 卢孝宇
 * @date 2023/12/15 10:02
 */
public class CommentsMapperImpl extends CommonDao implements CommentsMapper {
    @Override
    public Integer insert(Integer userId, Integer postId, String comments, String recoveryTime, String address, Integer likeCount,Integer status) {
        Integer list = null;

        Object[] params = {userId,postId,comments,recoveryTime,address,likeCount};
        try {
            list = executeUpdate("insert into tl_details(userId,postId,comments,recoveryTime,address,likeCount) " +
                    "values(?,?,?,?,?,?)",params);
        } catch (SQLException e) {
            throw new RuntimeException(e);
        }
        return list;
    }
}
